﻿<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="/css/style.css"/>
	</head>
	<body>
		<%- include("./include/top.ejs") %>
		<main>
			<div class="banner"><img src="/images/1.jpg"><span>勇攀高峰 砥砺前行</span></div>
			<div class="container">
				<aside>
					<h2>产品服务</h2>
					<ul>
						<li><a href="/product?cat_id=1">汽车配件</a></li>
						<li><a href="/product?cat_id=2">轮船配件</a></li>
						<li><a href="/product?cat_id=3">数码产品</a></li>
						<li><a href="/product?cat_id=4">家居用品</a></li>
					</ul>
				</aside>
				<article class="main">
					<h2>商品详情</h2>					
				    <DIV id="detail">	
						<DIV class="productImg">
							
								
								<!-- 不考虑后台上传图片的显示，用下面一行代码 -->
								<!-- <IMG src="/<%= oneProduct[0].image %>" width=300>	 -->  

								<!-- 若管理后台（http://localhost:3006/）上传了图片，存到表中是upload开头，要用网络地址显示新上传图片的路径 -->
<IMG src="<%= (oneProduct[0].image.substr(0,6)=='upload')?('http://localhost:3006/'+oneProduct[0].image):('/'+oneProduct[0].image) %>">

						</DIV>
						<DIV class="productInfo">
							<H1><%= oneProduct[0].name %></H1>
							<UL>
							  <LI class=productPrice>价格：<EM class=price>￥<%= oneProduct[0].price %> 元</EM></LI>
							</UL>
						 </DIV>
						<DIV class=clear></DIV>
						
						<DIV class="productContent">
							<H3>产品介绍</H3>
							<UL><%- oneProduct[0].content %></UL>
						</DIV>
				   </DIV>				    							
				</article>				
			</div>
		</main>
		<%- include("./include/bottom.ejs") %>
	</body>
</html>

